#ifndef __LINALG_NUMERIC_H__
#define __LINALG_NUMERIC_H__

#include "config.h"



LINALG_BEGIN

/*
 * Numeric class for basic numeric operations.
 * Contains: 
 * - add: addition operation.
 * - sub: subtraction operation.
 * - mul: multiplication operation.
 * - div: division operation.
 * - neg: negation operation.
 * - abs: absolute value operation.
 */
template<typename T>
class Numeric
{
public:
    static T add(const T& v1, const T& v2) { return v1 + v2; }
    static T sub(const T& v1, const T& v2) { return v1 - v2; }
    static T mul(const T& v1, const T& v2) { return v1 * v2; }
    static T div(const T& v1, const T& v2) { return v1 / v2; }
    static T neg(const T& v) { return -v; }
    static T abs(const T& v) { return std::abs(v); }
    static T fromInteger(int v) { return static_cast<T>(v); }
};



LINALG_END

#endif